<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
	<head>
		<base href="<%=basePath%>">
		<meta charset="utf-8" />
		<title></title>
       <link rel="stylesheet" href="front/css/normal.css">
        <link rel="stylesheet" href="front/css/addBox.css">		
<script type="text/javascript">
	
	
	//保存
	function save(){
		if($("#department_name").val()==""){
			$("#department_name").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#department_name").focus();
			return false;
		}
		if($("#department_remark").val()==""){
			$("#department_remark").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#department_remark").focus();
			return false;
		}
		$("#Form").submit();
		$("#zhongxin").hide();
		$("#zhongxin2").show();
	}
	
</script>
	</head>
<body>
     <p class="addSlide-title">添加部门<span>×</span></p>
	<form action="department/${msg }.do" name="Form" id="Form" method="post">
		<input type="hidden" name="department_id" id="department_id" value="${pd.department_id}"/>
		<ul class="addList">
				<li><span>部门名称:</span><input type="text" name="department_name" id="department_name" value="${pd.department_name}" maxlength="32" placeholder="这里输入" title=""/></li>
				<li><span>部门描述:</span><textarea id="department_remark" name="department_remark" rows="10">${pd.department_remark}</textarea></li>
		</ul>
		 <p>
                   <input type="button"  onclick="cancel()" value="取消保存" class="cancelSave">
                    <input type="button" onclick="save();" value="确认保存" class="confirmSave">
          </p>
	</form>
	    <script src="front/js/jquery-2.0.3.min.js"></script>
	   <script src="front/js/index.js"></script>
	   <script type="text/javascript" src="front/js/jquery.tips.js"></script>
		<script type="text/javascript">
	 	function cancel(){
			$('#zhongxin', parent.document).hide();
		}
	  	
		$(function() {
			//单选框
			$(".chzn-select").chosen(); 
			$(".chzn-select-deselect").chosen({allow_single_deselect:true}); 
			
			//日期框
			$('.date-picker').datepicker();
			
		});
		
		</script>
</body>
</html>